package cn.wcy.design_patterns.test.Controller.demo2.test1;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDate;

/**
 * Description:
 *
 * @author wcy
 * @version 1.0
 * @date 2024/6/17 上午11:28
 */
@RestController
public class DemoTest1Controller {

    @Resource
    private BudgetPlan budgetPlan;

    @GetMapping("/query/test1")
    public void query(@RequestParam String startDate, @RequestParam String endDate)
    {
        LocalDate start = LocalDate.parse(startDate);
        LocalDate end = LocalDate.parse(endDate);
        long query = budgetPlan.query(start, end);
        System.out.println("query = " + query);
    }

}
